home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_10
/
1010066a
< prev
next >
Wrap
Text File
|
1992-08-09
|
680b
|
33 lines
struct s_date
{
int month;
int day;
int year;
};
int function_requiring_pointer_to_date(struct s_date * p_date);
int function_requiring_reference_to_date(struct s_date & date);
void calling_function()
{
struct s_date my_date;
function_requiring_pointer_to_date(&my_date);
function_requiring_reference_to_date(my_date);
...
};
int function_requiring_pointer_to_date(struct s_date *p_date)
{
int month;
month = p_date->month;
....
}
int function_requiring_reference_to_date(struct s_date & date)
{
int month;
month = date.month;
...
}